<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>操作系统复习策略 - James 专属</title>
    <style>
        body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif; margin: 0; padding: 0; background: #f5f7fa; color: #2c3e50; }
        .container { max-width: 1200px; margin: 0 auto; padding: 20px; }
        .header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 40px; border-radius: 15px; margin-bottom: 30px; text-align: center; }
        .section { background: white; margin: 20px 0; padding: 30px; border-radius: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
        .skill-radar { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin: 20px 0; }
        .radar-item { background: #f8f9fa; padding: 20px; border-radius: 8px; border-left: 4px solid #667eea; }
        .timeline { position: relative; padding: 20px 0; }
        .timeline-item { position: relative; padding: 20px 0 20px 40px; border-left: 2px solid #667eea; margin-left: 20px; }
        .timeline-marker { position: absolute; left: -11px; top: 25px; width: 20px; height: 20px; background: #667eea; border-radius: 50%; }
        .knowledge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; margin: 20px 0; }
        .knowledge-card { background: #f8f9fa; padding: 20px; border-radius: 8px; border-top: 3px solid #28a745; }
        .progress-bar { background: #e9ecef; height: 8px; border-radius: 4px; overflow: hidden; margin: 10px 0; }
        .progress-fill { background: linear-gradient(90deg, #667eea, #764ba2); height: 100%; transition: width 0.3s ease; }
        .highlight { background: #fff3cd; padding: 15px; border-left: 4px solid #ffc107; margin: 15px 0; }
        .collapsible { cursor: pointer; padding: 15px; background: #667eea; color: white; border: none; border-radius: 5px; margin: 10px 0; }
        .content { display: none; padding: 15px; background: #f8f9fa; border-radius: 0 0 5px 5px; }
        .tag { display: inline-block; background: #667eea; color: white; padding: 5px 12px; border-radius: 15px; font-size: 12px; margin: 3px; }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>🎯 操作系统复习策略报告</h1>
            <p>基于 James 技术背景的Linux系统深度复习方案</p>
            <div style="margin-top: 20px;">
                <span class="tag">C/C++专家</span>
                <span class="tag">高并发架构</span>
                <span class="tag">内存优化</span>
                <span class="tag">OOM调优</span>
            </div>
        </div>

        <div class="section">
            <h2>🚀 个人优势分析</h2>
            <div class="skill-radar">
                <div class="radar-item">
                    <h3>现有技能雷达</h3>
                    <div style="margin: 10px 0;">
                        <div>Linux系统编程 <div class="progress-bar"><div class="progress-fill" style="width: 85%"></div></div> 85%</div>
                        <div>内存管理优化 <div class="progress-bar"><div class="progress-fill" style="width: 90%"></div></div> 90%</div>
                        <div>高并发架构 <div class="progress-bar"><div class="progress-fill" style="width: 80%"></div></div> 80%</div>
                        <div>内核调试 <div class="progress-bar"><div class="progress-fill" style="width: 75%"></div></div> 75%</div>
                        <div>容器化技术 <div class="progress-bar"><div class="progress-fill" style="width: 70%"></div></div> 70%</div>
                    </div>
                </div>
                <div class="radar-item">
                    <h3>项目经验亮点</h3>
                    <ul>
                        <li>✅ 成功解决生产环境OOM问题，深入理解内存分配机制</li>
                        <li>✅ 构建高可用Neo4j集群，掌握分布式系统原理</li>
                        <li>✅ 优化内存索引结构，降低25%峰值内存使用</li>
                        <li>✅ 主导Kubernetes微服务标准化，熟悉容器运行时</li>
                    </ul>
                </div>
            </div>
        </div>

        <div class="section">
            <h2>📅 四阶段复习时间轴</h2>
            <div class="timeline">
                <div class="timeline-item">
                    <div class="timeline-marker"></div>
                    <h3>第一阶段：基础巩固 (2-3周)</h3>
                    <p><strong>目标：</strong>系统梳理操作系统核心概念</p>
                    <ul>
                        <li>📚 重点：进程线程模型、虚拟内存、文件系统基础</li>
                        <li>🛠️ 实践：实现简易shell、内存分配器</li>
                        <li>📊 验证：完成30道经典OS笔试题</li>
                    </ul>
                </div>
                
                <div class="timeline-item">
                    <div class="timeline-marker"></div>
                    <h3>第二阶段：内核深入 (3-4周)</h3>
                    <p><strong>目标：</strong>深入理解Linux内核实现</p>
                    <ul>
                        <li>🔍 重点：slab分配器、CFS调度器、ext4文件系统</li>
                        <li>🛠️ 实践：分析/proc/meminfo、编写内核模块</li>
                        <li>📊 验证：完成内核源码走读10个关键函数</li>
                    </ul>
                </div>

                <div class="timeline-item">
                    <div class="timeline-marker"></div>
                    <h3>第三阶段：实战调优 (2-3周)</h3>
                    <p><strong>目标：</strong>掌握性能分析与故障排查</p>
                    <ul>
                        <li>⚡ 重点：perf工具链、eBPF程序、火焰图分析</li>
                        <li>🛠️ 实践：重现并解决模拟OOM场景</li>
                        <li>📊 验证：完成3个生产级性能优化案例</li>
                    </ul>
                </div>

                <div class="timeline-item">
                    <div class="timeline-marker"></div>
                    <h3>第四阶段：架构提升 (2周)</h3>
                    <p><strong>目标：</strong>构建完整知识体系</p>
                    <ul>
                        <li>🎯 重点：NUMA架构、内存屏障、RCU机制</li>
                        <li>🛠️ 实践：设计高并发内存池</li>
                        <li>📊 验证：完成技术分享或博客文章</li>
                    </ul>
                </div>
            </div>
        </div>

        <div class="section">
            <h2>🎯 分层知识点策略</h2>
            <div class="knowledge-grid">
                <div class="knowledge-card">
                    <h3>基础必会</h3>
                    <ul>
                        <li>进程 vs 线程实现差异</li>
                        <li>虚拟内存三级页表</li>
                        <li>VFS抽象层设计</li>
                        <li>系统调用流程</li>
                    </ul>
                    <div class="tag">优先级：高</div>
                </div>
                
                <div class="knowledge-card">
                    <h3>进阶重点</h3>
                    <ul>
                        <li>slab/slub/slob分配器</li>
                        <li>CFS调度器权重计算</li>
                        <li>ext4 extent树结构</li>
                        <li>epoll内核实现</li>
                    </ul>
                    <div class="tag">优先级：高</div>
                </div>

                <div class="knowledge-card">
                    <h3>实战技巧</h3>
                    <ul>
                        <li>perf stat/top/record</li>
                        <li>echo 1 > /proc/sys/vm/drop_caches</li>
                        <li>echo f > /proc/sysrq-trigger</li>
                        <li>bpftrace单行脚本</li>
                    </ul>
                    <div class="tag">优先级：中</div>
                </div>

                <div class="knowledge-card">
                    <h3>架构精髓</h3>
                    <ul>
                        <li>NUMA节点内存亲和性</li>
                        <li>内存屏障与乱序执行</li>
                        <li>RCU读拷贝更新机制</li>
                        <li>per-CPU变量优化</li>
                    </ul>
                    <div class="tag">优先级：中</div>
                </div>
            </div>
        </div>

        <div class="section">
            <h2>🔧 个性化深度建议</h2>
            <div class="highlight">
                <h4>基于你的OOM调优经验，建议重点突破：</h4>
                <ol>
                    <li><strong>内存分配热点分析：</strong>结合你之前的内存优化项目，深入学习slab分配器的着色机制与缓存对齐优化</li>
                    <li><strong>容器内存限制：</strong>研究cgroup v2的memory.high/memory.max实现，对比你之前使用的v1版本差异</li>
                    <li><strong>调度延迟优化：</strong>利用你高并发架构经验，分析CFS调度器中vruntime的计算与负载均衡策略</li>
                    <li><strong>文件系统性能：</strong>结合Neo4j的存储特性，深入研究ext4的延迟分配与日志提交机制</li>
                </ol>
            </div>
        </div>

        <div class="section">
            <h2>📚 学习资源推荐</h2>
            <button class="collapsible">📖 书籍推荐</button>
            <div class="content">
                <ul>
                    <li>《深入理解Linux内核》- 配合源码走读</li>
                    <li>《Linux内核设计与实现》- 重点看内存管理和进程调度章节</li>
                    <li>《性能之巅》- 结合perf工具实践</li>
                    <li>《Linux系统编程》- 巩固基础概念</li>
                </ul>
            </div>

            <button class="collapsible">🛠️ 工具清单</button>
            <div class="content">
                <ul>
                    <li>调试：gdb、crash、systemtap</li>
                    <li>性能：perf、bcc-tools、bpftrace</li>
                    <li>分析：flamegraph、memleak-bpf</li>
                    <li>实验：qemu+gdb调试内核</li>
                </ul>
            </div>

            <button class="collapsible">🏃 实战项目</button>
            <div class="content">
                <ul>
                    <li>实现tcmalloc风格的内存分配器</li>
                    <li>开发eBPF程序监控系统调用</li>
                    <li>优化Redis的内存碎片问题</li>
                    <li>设计NUMA感性的内存池</li>
                </ul>
            </div>
        </div>

        <div class="section">
            <h2>🎪 每日复习模板</h2>
            <div style="background: #f8f9fa; padding: 20px; border-radius: 8px;">
                <h4>建议每日投入2小时，按以下节奏：</h4>
                <ul>
                    <li><strong>30分钟理论：</strong>精读内核源码的一个子系统</li>
                    <li><strong>45分钟实践：</strong>用工具验证理论（如/proc文件系统）</li>
                    <li><strong>30分钟调优：</strong>复现一个性能问题并解决</li>
                    <li><strong>15分钟总结：</strong>记录到技术博客</li>
                </ul>
            </div>
        </div>

        <div class="section">
            <h2>🎯 验证里程碑</h2>
            <div class="knowledge-grid">
                <div class="knowledge-card">
                    <h3>阶段1验证</h3>
                    <p>能画出从fork()到execve()的完整流程图</p>
                </div>
                <div class="knowledge-card">
                    <h3>阶段2验证</h3>
                    <p>能解释slab分配器如何解决内部碎片</p>
                </div>
                <div class="knowledge-card">
                    <h3>阶段3验证</h3>
                    <p>用eBPF定位一次调度延迟根因</p>
                </div>
                <div class="knowledge-card">
                    <h3>阶段4验证</h3>
                    <p>设计支持NUMA的内存分配策略</p>
                </div>
            </div>
        </div>
    </div>

    <script>
        // 折叠面板功能
        var coll = document.getElementsByClassName("collapsible");
        for (var i = 0; i < coll.length; i++) {
            coll[i].addEventListener("click", function() {
                this.classList.toggle("active");
                var content = this.nextElementSibling;
                if (content.style.display === "block") {
                    content.style.display = "none";
                } else {
                    content.style.display = "block";
                }
            });
        }

        // 进度条动画
        window.addEventListener('load', function() {
            const progressBars = document.querySelectorAll('.progress-fill');
            progressBars.forEach(bar => {
                const width = bar.style.width;
                bar.style.width = '0%';
                setTimeout(() => {
                    bar.style.width = width;
                }, 500);
            });
        });
    </script>
</body>
</html>